import request from '@/utils/request'

// 查询单据动作监听列表
export function listListener(query) {
  return request({
    url: '/listener/list',
    method: 'get',
    params: query
  })
}

// 查询单据动作监听详细
export function getListener(id) {
  return request({
    url: '/listener/' + id,
    method: 'get'
  })
}

// 新增单据动作监听
export function addListener(data) {
  return request({
    url: '/listener',
    method: 'post',
    data: data
  })
}

// 修改单据动作监听
export function updateListener(data) {
  return request({
    url: '/listener',
    method: 'put',
    data: data
  })
}

// 删除单据动作监听
export function delListener(id) {
  return request({
    url: '/listener/' + id,
    method: 'delete'
  })
}

// 查询单据动作监听名称列表
export function getListenerNameList(query) {
  return request({
    url: '/listener/getListenerNameList',
    method: 'get',
    params: query
  })
}